#ifndef X11_H
#define X11_H

#include "common.h"

template <AllegroVersion version>
struct x11
{
    uint32_t t;
    uint32_t k;

    // String
    uint32_t ptr1;

    // Points to: x11, footprint
    uint32_t ptr2;

    // Points to: x08
    uint32_t ptr3;

    uint32_t un;
#if __cplusplus >= 202002L
    COND_FIELD(version >= A_174, uint32_t, un1);
#endif
    uint32_t TAIL;
    operator x11<A_174>() const;
    static constexpr AllegroVersion versions[1] = {A_174};
};

#if __cplusplus < 202002L
template <> struct x11<A_174>
{
    uint32_t t;
    uint32_t k;

    // String
    uint32_t ptr1;

    // Points to: x11, footprint
    uint32_t ptr2;

    // Points to: x08
    uint32_t ptr3;

    uint32_t un;

    uint32_t un1;

    uint32_t TAIL;
    operator x11<A_174>() const;
    static constexpr AllegroVersion versions[1] = {A_174};
};
#endif

#endif // X11_H
